gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c gtk/gtkframe.c
authorOwen Taylor <otaylor@redhat.com>
Thu, 14 Jan 1999 06:04:55 +0000 (06:04 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 14 Jan 1999 06:04:55 +0000 (06:04 +0000)
Wed Jan 13 22:34:29 1999  Owen Taylor  <otaylor@redhat.com>

* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
gtk/gtktreeeitem.c gtk/gtkviewport.c

Fix up comparisons of signed and unsigned ints to avoid
assigning negative widths/heigths.

25 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkbutton.c
gtk/gtkclist.c
gtk/gtkframe.c
gtk/gtkhandlebox.c
gtk/gtkhbox.c
gtk/gtkhpaned.c
gtk/gtklist.c
gtk/gtkmenu.c
gtk/gtkmenubar.c
gtk/gtkmenuitem.c
gtk/gtknotebook.c
gtk/gtkscrolledwindow.c
gtk/gtktable.c
gtk/gtktree.c
gtk/gtktreeitem.c
gtk/gtkvbox.c
gtk/gtkviewport.c
gtk/gtkvpaned.c

index 7e403c19d7ecbfdc65f47e3d9b9b8898157ebb65..59534b2617b52d0123a5d8db81f22a490475a9b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Wed Jan 13 22:34:29 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+       gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+       gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+       gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+       gtk/gtktreeeitem.c gtk/gtkviewport.c
+       
+       Fix up comparisons of signed and unsigned ints to avoid 
+       assigning negative widths/heigths.
+
 Wed Jan 13 21:18:41 1999  Owen Taylor  <otaylor@redhat.com>
 
        * acinclude.m4 (ac_result): Unset CATOBJEXT so
index 7e403c19d7ecbfdc65f47e3d9b9b8898157ebb65..59534b2617b52d0123a5d8db81f22a490475a9b5 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jan 13 22:34:29 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+       gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+       gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+       gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+       gtk/gtktreeeitem.c gtk/gtkviewport.c
+       
+       Fix up comparisons of signed and unsigned ints to avoid 
+       assigning negative widths/heigths.
+
 Wed Jan 13 21:18:41 1999  Owen Taylor  <otaylor@redhat.com>
 
        * acinclude.m4 (ac_result): Unset CATOBJEXT so
index 7e403c19d7ecbfdc65f47e3d9b9b8898157ebb65..59534b2617b52d0123a5d8db81f22a490475a9b5 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jan 13 22:34:29 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+       gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+       gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+       gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+       gtk/gtktreeeitem.c gtk/gtkviewport.c
+       
+       Fix up comparisons of signed and unsigned ints to avoid 
+       assigning negative widths/heigths.
+
 Wed Jan 13 21:18:41 1999  Owen Taylor  <otaylor@redhat.com>
 
        * acinclude.m4 (ac_result): Unset CATOBJEXT so
index 7e403c19d7ecbfdc65f47e3d9b9b8898157ebb65..59534b2617b52d0123a5d8db81f22a490475a9b5 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jan 13 22:34:29 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+       gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+       gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+       gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+       gtk/gtktreeeitem.c gtk/gtkviewport.c
+       
+       Fix up comparisons of signed and unsigned ints to avoid 
+       assigning negative widths/heigths.
+
 Wed Jan 13 21:18:41 1999  Owen Taylor  <otaylor@redhat.com>
 
        * acinclude.m4 (ac_result): Unset CATOBJEXT so
index 7e403c19d7ecbfdc65f47e3d9b9b8898157ebb65..59534b2617b52d0123a5d8db81f22a490475a9b5 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jan 13 22:34:29 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+       gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+       gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+       gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+       gtk/gtktreeeitem.c gtk/gtkviewport.c
+       
+       Fix up comparisons of signed and unsigned ints to avoid 
+       assigning negative widths/heigths.
+
 Wed Jan 13 21:18:41 1999  Owen Taylor  <otaylor@redhat.com>
 
        * acinclude.m4 (ac_result): Unset CATOBJEXT so
index 7e403c19d7ecbfdc65f47e3d9b9b8898157ebb65..59534b2617b52d0123a5d8db81f22a490475a9b5 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jan 13 22:34:29 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+       gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+       gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+       gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+       gtk/gtktreeeitem.c gtk/gtkviewport.c
+       
+       Fix up comparisons of signed and unsigned ints to avoid 
+       assigning negative widths/heigths.
+
 Wed Jan 13 21:18:41 1999  Owen Taylor  <otaylor@redhat.com>
 
        * acinclude.m4 (ac_result): Unset CATOBJEXT so
index 7e403c19d7ecbfdc65f47e3d9b9b8898157ebb65..59534b2617b52d0123a5d8db81f22a490475a9b5 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jan 13 22:34:29 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
+       gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
+       gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
+       gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
+       gtk/gtktreeeitem.c gtk/gtkviewport.c
+       
+       Fix up comparisons of signed and unsigned ints to avoid 
+       assigning negative widths/heigths.
+
 Wed Jan 13 21:18:41 1999  Owen Taylor  <otaylor@redhat.com>
 
        * acinclude.m4 (ac_result): Unset CATOBJEXT so
index 28e2a57bbb5f8af684457beb783a889165b5ef37..44475d64fe20ceb8c38a8993bf0eed4227788217 100644 (file)
@@ -471,9 +471,9 @@ gtk_button_size_allocate (GtkWidget     *widget,
       child_allocation.x = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->xthickness);
       child_allocation.y = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->ythickness);
 
-      child_allocation.width = MAX (1, widget->allocation.width - child_allocation.x * 2 -
+      child_allocation.width = MAX (1, (gint)widget->allocation.width - child_allocation.x * 2 -
                                 border_width * 2);
-      child_allocation.height = MAX (1, widget->allocation.height - child_allocation.y * 2 -
+      child_allocation.height = MAX (1, (gint)widget->allocation.height - child_allocation.y * 2 -
                                  border_width * 2);
 
       if (GTK_WIDGET_CAN_DEFAULT (button))
@@ -482,10 +482,10 @@ gtk_button_size_allocate (GtkWidget     *widget,
                                 DEFAULT_LEFT_POS);
          child_allocation.y += (GTK_WIDGET (widget)->style->klass->ythickness +
                                 DEFAULT_TOP_POS);
-         child_allocation.width =  MAX (1, child_allocation.width -
-                                       (GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
-         child_allocation.height = MAX (1, child_allocation.height -
-                                        (GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
+         child_allocation.width =  MAX (1, (gint)child_allocation.width -
+                                        (gint)(GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
+         child_allocation.height = MAX (1, (gint)child_allocation.height -
+                                        (gint)(GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
        }
 
       gtk_widget_size_allocate (GTK_BIN (button)->child, &child_allocation);
index ab6acb6a56dd85cea30c5666b25e1a94a9c62105..0a0e176d5e934697d4626777ffdfe8f52986fbf0 100644 (file)
@@ -5367,9 +5367,9 @@ gtk_clist_size_allocate (GtkWidget     *widget,
    * border width */
   clist->internal_allocation.x = 0;
   clist->internal_allocation.y = 0;
-  clist->internal_allocation.width = MAX (1, allocation->width -
+  clist->internal_allocation.width = MAX (1, (gint)allocation->width -
                                          border_width * 2);
-  clist->internal_allocation.height = MAX (1, allocation->height -
+  clist->internal_allocation.height = MAX (1, (gint)allocation->height -
                                           border_width * 2);
        
   /* allocate clist window assuming no scrollbars */
@@ -5378,11 +5378,11 @@ gtk_clist_size_allocate (GtkWidget     *widget,
   clist_allocation.y = (clist->internal_allocation.y +
                        widget->style->klass->ythickness +
                        clist->column_title_area.height);
-  clist_allocation.width = MAX (1, clist->internal_allocation.width - 
-                               (2 * widget->style->klass->xthickness));
-  clist_allocation.height = MAX (1, clist->internal_allocation.height -
-                                (2 * widget->style->klass->ythickness) -
-                                clist->column_title_area.height);
+  clist_allocation.width = MAX (1, (gint)clist->internal_allocation.width - 
+                               (2 * (gint)widget->style->klass->xthickness));
+  clist_allocation.height = MAX (1, (gint)clist->internal_allocation.height -
+                                (2 * (gint)widget->style->klass->ythickness) -
+                                (gint)clist->column_title_area.height);
   
   clist->clist_window_width = clist_allocation.width;
   clist->clist_window_height = clist_allocation.height;
index 5831382da630e6111a86725cc6edcec7b341847e..789d158deb559b3b2c0f9b3a5d42a8f35fd6ba0f 100644 (file)
@@ -497,13 +497,13 @@ gtk_frame_size_allocate (GtkWidget     *widget,
     {
       child_allocation.x = (GTK_CONTAINER (frame)->border_width +
                            GTK_WIDGET (frame)->style->klass->xthickness);
-      child_allocation.width = MAX(0, allocation->width - child_allocation.x * 2);
+      child_allocation.width = MAX(1, (gint)allocation->width - child_allocation.x * 2);
 
       child_allocation.y = (GTK_CONTAINER (frame)->border_width +
                            MAX (frame->label_height, GTK_WIDGET (frame)->style->klass->ythickness));
-      child_allocation.height = MAX (1, (allocation->height - child_allocation.y -
-                                        GTK_CONTAINER (frame)->border_width -
-                                        GTK_WIDGET (frame)->style->klass->ythickness));
+      child_allocation.height = MAX (1, ((gint)allocation->height - child_allocation.y -
+                                        (gint)GTK_CONTAINER (frame)->border_width -
+                                        (gint)GTK_WIDGET (frame)->style->klass->ythickness));
 
       child_allocation.x += allocation->x;
       child_allocation.y += allocation->y;
index e39be04d48ad583f30438039e5ee970dc946189a..de0f01250b49b160049cc9d81422333541f34218 100644 (file)
@@ -575,8 +575,8 @@ gtk_handle_box_size_allocate (GtkWidget     *widget,
        }
       else
        {
-         child_allocation.width = MAX (1, widget->allocation.width - 2 * border_width);
-         child_allocation.height = MAX (1, widget->allocation.height - 2 * border_width);
+         child_allocation.width = MAX (1, (gint)widget->allocation.width - 2 * border_width);
+         child_allocation.height = MAX (1, (gint)widget->allocation.height - 2 * border_width);
 
          if (hb->handle_position == GTK_POS_LEFT ||
              hb->handle_position == GTK_POS_RIGHT)
index 6c3db7484918b2b87e803df1032eca440f9984b7..0c10550b822c681cf10706a72d37f55467134658 100644 (file)
@@ -200,7 +200,7 @@ gtk_hbox_size_allocate (GtkWidget     *widget,
 
       x = allocation->x + GTK_CONTAINER (box)->border_width;
       child_allocation.y = allocation->y + GTK_CONTAINER (box)->border_width;
-      child_allocation.height = MAX (1, allocation->height - GTK_CONTAINER (box)->border_width * 2);
+      child_allocation.height = MAX (1, (gint)allocation->height - (gint)GTK_CONTAINER (box)->border_width * 2);
 
       children = box->children;
       while (children)
@@ -238,7 +238,7 @@ gtk_hbox_size_allocate (GtkWidget     *widget,
 
              if (child->fill)
                {
-                 child_allocation.width = MAX (1, child_width - child->padding * 2);
+                 child_allocation.width = MAX (1, (gint)child_width - (gint)child->padding * 2);
                  child_allocation.x = x + child->padding;
                }
              else
@@ -291,7 +291,7 @@ gtk_hbox_size_allocate (GtkWidget     *widget,
 
               if (child->fill)
                 {
-                  child_allocation.width = MAX (1, child_width - child->padding * 2);
+                  child_allocation.width = MAX (1, (gint)child_width - (gint)child->padding * 2);
                   child_allocation.x = x + child->padding - child_width;
                 }
               else
index 6aabc424ed271ba2dba3bac828236886cdb5e3e8..333ed76ab8893f6804606b05a4042aacb216b824 100644 (file)
@@ -174,7 +174,7 @@ gtk_hpaned_size_allocate (GtkWidget     *widget,
                             paned->groove_rectangle.height);
     }
   
-  child1_allocation.height = child2_allocation.height = MAX (1, allocation->height - border_width * 2);
+  child1_allocation.height = child2_allocation.height = MAX (1, (gint)allocation->height - border_width * 2);
   child1_allocation.width = paned->child1_size;
   child1_allocation.x = border_width;
   child1_allocation.y = child2_allocation.y = border_width;
@@ -186,7 +186,7 @@ gtk_hpaned_size_allocate (GtkWidget     *widget,
   paned->groove_rectangle.height = allocation->height;
       
   child2_allocation.x = paned->groove_rectangle.x + paned->gutter_size / 2 + 1;
-  child2_allocation.width = MAX (1, allocation->width
+  child2_allocation.width = MAX (1, (gint)allocation->width
     - child2_allocation.x - border_width);
   
   /* Now allocate the childen, making sure, when resizing not to
index 45527aa94adb6efb89e3b83e900dbbfc48231767..0a2f0c3a7b947b6557e5ed930fd57d83981bf658 100644 (file)
@@ -368,7 +368,7 @@ gtk_list_size_allocate (GtkWidget     *widget,
     {
       child_allocation.x = GTK_CONTAINER (list)->border_width;
       child_allocation.y = GTK_CONTAINER (list)->border_width;
-      child_allocation.width = MAX (1, allocation->width -
+      child_allocation.width = MAX (1, (gint)allocation->width -
                                    child_allocation.x * 2);
 
       children = list->children;
index c603279b58975739592cfe3bfc542e35b5a380eb..d3fcb3c715fabd1fb3367352f0d364604b71ce1c 100644 (file)
@@ -766,7 +766,7 @@ gtk_menu_size_allocate (GtkWidget     *widget,
                            widget->style->klass->xthickness);
       child_allocation.y = (GTK_CONTAINER (menu)->border_width +
                            widget->style->klass->ythickness);
-      child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
+      child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
       
       children = menu_shell->children;
       while (children)
index e79e9ebe176477a120bf2b15791a8940092a9849..bf75e395f4522c77b567a704b63b1b2ccddae1cc 100644 (file)
@@ -293,7 +293,7 @@ gtk_menu_bar_size_allocate (GtkWidget     *widget,
       child_allocation.y = (GTK_CONTAINER (menu_bar)->border_width +
                            widget->style->klass->ythickness +
                            BORDER_SPACING);
-      child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
+      child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
 
       children = menu_shell->children;
       while (children)
index 4b506e0157291d18d326596c59280a9dfd01e277..3241a1a7683b19bd425bdd77f1d335e65fdd8f02 100644 (file)
@@ -386,8 +386,8 @@ gtk_menu_item_size_allocate (GtkWidget     *widget,
                            BORDER_SPACING);
       child_allocation.y = (GTK_CONTAINER (widget)->border_width +
                            widget->style->klass->ythickness);
-      child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
-      child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
+      child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
+      child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
       child_allocation.x += GTK_MENU_ITEM (widget)->toggle_size;
       child_allocation.width -= GTK_MENU_ITEM (widget)->toggle_size;
       if (menu_item->submenu && menu_item->show_submenu_indicator)
index 1432ea976dc832dd2ee4dda4e2d2d6a264766279..eea6d90a3ba2f4bbccdd9596609155e18b54cc70 100644 (file)
@@ -823,17 +823,17 @@ gtk_notebook_size_allocate (GtkWidget     *widget,
     {
       child_allocation.x = GTK_CONTAINER (widget)->border_width;
       child_allocation.y = GTK_CONTAINER (widget)->border_width;
-      child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
-      child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
+      child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
+      child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
 
       if (notebook->show_tabs || notebook->show_border)
        {
          child_allocation.x += widget->style->klass->xthickness;
          child_allocation.y += widget->style->klass->ythickness;
-         child_allocation.width = MAX (1, child_allocation.width -
-                                       widget->style->klass->xthickness * 2);
-         child_allocation.height = MAX (1, child_allocation.height -
-                                        widget->style->klass->ythickness * 2);
+         child_allocation.width = MAX (1, (gint)child_allocation.width -
+                                       (gint) widget->style->klass->xthickness * 2);
+         child_allocation.height = MAX (1, (gint)child_allocation.height -
+                                        (gint) widget->style->klass->ythickness * 2);
 
          if (notebook->show_tabs && notebook->children && notebook->cur_page)
            {
@@ -843,15 +843,15 @@ gtk_notebook_size_allocate (GtkWidget     *widget,
                  child_allocation.y += notebook->cur_page->requisition.height;
                case GTK_POS_BOTTOM:
                  child_allocation.height =
-                   MAX (1, child_allocation.height -
-                        notebook->cur_page->requisition.height);
+                   MAX (1, (gint)child_allocation.height -
+                        (gint)notebook->cur_page->requisition.height);
                  break;
                case GTK_POS_LEFT:
                  child_allocation.x += notebook->cur_page->requisition.width;
                case GTK_POS_RIGHT:
                  child_allocation.width =
-                   MAX (1, child_allocation.width -
-                        notebook->cur_page->requisition.width);
+                   MAX (1, (gint)child_allocation.width -
+                        (gint)notebook->cur_page->requisition.width);
                  break;
                }
            }
index 760964c52013648c75abb0daee595825fe4bea5f..d994449a46ee810f43b98009928e97f879b0dcc4 100644 (file)
@@ -676,8 +676,8 @@ gtk_scrolled_window_relative_allocation (GtkWidget     *widget,
 
   allocation->x = GTK_CONTAINER (widget)->border_width;
   allocation->y = GTK_CONTAINER (widget)->border_width;
-  allocation->width = MAX (1, widget->allocation.width - allocation->x * 2);
-  allocation->height = MAX (1, widget->allocation.height - allocation->y * 2);
+  allocation->width = MAX (1, (gint)widget->allocation.width - allocation->x * 2);
+  allocation->height = MAX (1, (gint)widget->allocation.height - allocation->y * 2);
 
   if (scrolled_window->vscrollbar_visible)
     {
@@ -686,9 +686,9 @@ gtk_scrolled_window_relative_allocation (GtkWidget     *widget,
        allocation->x += (scrolled_window->vscrollbar->requisition.width +
                          SCROLLBAR_SPACING (scrolled_window));
 
-      allocation->width = MAX (1, allocation->width -
-                              (scrolled_window->vscrollbar->requisition.width +
-                               SCROLLBAR_SPACING (scrolled_window)));
+      allocation->width = MAX (1, (gint)allocation->width -
+                              ((gint)scrolled_window->vscrollbar->requisition.width +
+                               (gint)SCROLLBAR_SPACING (scrolled_window)));
     }
   if (scrolled_window->hscrollbar_visible)
     {
@@ -697,9 +697,9 @@ gtk_scrolled_window_relative_allocation (GtkWidget     *widget,
        allocation->y += (scrolled_window->hscrollbar->requisition.height +
                          SCROLLBAR_SPACING (scrolled_window));
 
-      allocation->height = MAX (1, allocation->height -
-                               (scrolled_window->hscrollbar->requisition.height +
-                                SCROLLBAR_SPACING (scrolled_window)));
+      allocation->height = MAX (1, (gint)allocation->height -
+                               ((gint)scrolled_window->hscrollbar->requisition.height +
+                                (gint)SCROLLBAR_SPACING (scrolled_window)));
     }
 }
 
index d47fe498f90d81a676cdabab0597f902ef433bd3..f3e5aca30db98d9dc7bd6384e699e1662eb1faca 100644 (file)
@@ -1348,7 +1348,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
            if (table->cols[col].shrink)
              {
                extra = width / nshrink;
-               table->cols[col].allocation = MAX (1, table->cols[col].allocation - extra);
+               table->cols[col].allocation = MAX (1, (gint)table->cols[col].allocation - extra);
                
                width -= extra;
                nshrink -= 1;
@@ -1426,7 +1426,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
            if (table->rows[row].shrink)
              {
                extra = height / nshrink;
-               table->rows[row].allocation = MAX (1, table->rows[row].allocation - extra);
+               table->rows[row].allocation = MAX (1, (gint)table->rows[row].allocation - extra);
                
                height -= extra;
                nshrink -= 1;
@@ -1487,7 +1487,7 @@ gtk_table_size_allocate_pass2 (GtkTable *table)
          
          if (child->xfill)
            {
-             allocation.width = MAX (1, max_width - child->xpadding * 2);
+             allocation.width = MAX (1, max_width - (gint)child->xpadding * 2);
              allocation.x = x + (max_width - allocation.width) / 2;
            }
          else
@@ -1498,7 +1498,7 @@ gtk_table_size_allocate_pass2 (GtkTable *table)
          
          if (child->yfill)
            {
-             allocation.height = MAX (1, max_height - child->ypadding * 2);
+             allocation.height = MAX (1, max_height - (gint)child->ypadding * 2);
              allocation.y = y + (max_height - allocation.height) / 2;
            }
          else
index e94c35fdff33c1116ffa5e210ce7c7cf334d171f..058006ecd78d9ae7b68b978ee626935d56980875 100644 (file)
@@ -928,7 +928,7 @@ gtk_tree_size_allocate (GtkWidget     *widget,
     {
       child_allocation.x = GTK_CONTAINER (tree)->border_width;
       child_allocation.y = GTK_CONTAINER (tree)->border_width;
-      child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
+      child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
       
       children = tree->children;
       
index 53bb5e58a6384295f03f007ed50280bcf2e0ccac..8e99d59a5946e9fb38ff05ce24b4f5a109d8b36b 100644 (file)
@@ -551,11 +551,11 @@ gtk_tree_item_size_allocate (GtkWidget     *widget,
       gtk_widget_size_allocate (item->pixmaps_box, &child_allocation);
 
       child_allocation.y = GTK_CONTAINER (widget)->border_width;
-      child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
+      child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
       child_allocation.x += item->pixmaps_box->requisition.width+DEFAULT_DELTA;
 
       child_allocation.width = 
-       MAX (1, allocation->width - (child_allocation.x + border_width));
+       MAX (1, (gint)allocation->width - ((gint)child_allocation.x + border_width));
 
       gtk_widget_size_allocate (bin->child, &child_allocation);
     }
index 486b89706f64fa7572a2ec785c65d9d9dbf111ad..cd48869cce3cbbc891e9332dfb833fbb71309b8f 100644 (file)
@@ -200,7 +200,7 @@ gtk_vbox_size_allocate (GtkWidget     *widget,
 
       y = allocation->y + GTK_CONTAINER (box)->border_width;
       child_allocation.x = allocation->x + GTK_CONTAINER (box)->border_width;
-      child_allocation.width = MAX (1, allocation->width - GTK_CONTAINER (box)->border_width * 2);
+      child_allocation.width = MAX (1, (gint)allocation->width - (gint)GTK_CONTAINER (box)->border_width * 2);
 
       children = box->children;
       while (children)
@@ -238,7 +238,7 @@ gtk_vbox_size_allocate (GtkWidget     *widget,
 
              if (child->fill)
                {
-                 child_allocation.height = MAX (1, child_height - child->padding * 2);
+                 child_allocation.height = MAX (1, child_height - (gint)child->padding * 2);
                  child_allocation.y = y + child->padding;
                }
              else
@@ -291,7 +291,7 @@ gtk_vbox_size_allocate (GtkWidget     *widget,
 
               if (child->fill)
                 {
-                  child_allocation.height = MAX (1, child_height - child->padding * 2);
+                  child_allocation.height = MAX (1, child_height - (gint)child->padding * 2);
                   child_allocation.y = y + child->padding - child_height;
                 }
               else
index 0edc3a3b707e357e586776b0b4e94134212cc080..86769f1c9f6f8c793f218954495952a49d054ca4 100644 (file)
@@ -449,8 +449,8 @@ gtk_viewport_realize (GtkWidget *widget)
       attributes.y = 0;
     }
 
-  attributes.width = MAX (1, widget->allocation.width - attributes.x * 2 - border_width * 2);
-  attributes.height = MAX (1, widget->allocation.height - attributes.y * 2 - border_width * 2);
+  attributes.width = MAX (1, (gint)widget->allocation.width - attributes.x * 2 - border_width * 2);
+  attributes.height = MAX (1, (gint)widget->allocation.height - attributes.y * 2 - border_width * 2);
   attributes.event_mask = 0;
 
   viewport->view_window = gdk_window_new (widget->window, &attributes, attributes_mask);
index ecbe7ca34613b727e4e390f111cad6c0a660ad8f..ff5f25f0ac5fc3540ed5a01c3732687bbc8880a4 100644 (file)
@@ -174,7 +174,7 @@ gtk_vpaned_size_allocate (GtkWidget     *widget,
                             paned->groove_rectangle.height);
     }
   
-  child1_allocation.width = child2_allocation.width = MAX (1, allocation->width - border_width * 2);
+  child1_allocation.width = child2_allocation.width = MAX (1, (gint)allocation->width - border_width * 2);
   child1_allocation.height = paned->child1_size;
   child1_allocation.x = child2_allocation.x = border_width;
   child1_allocation.y = border_width;
@@ -186,7 +186,7 @@ gtk_vpaned_size_allocate (GtkWidget     *widget,
   paned->groove_rectangle.width = allocation->width;
   
   child2_allocation.y = paned->groove_rectangle.y + paned->gutter_size / 2 + 1;
-  child2_allocation.height = MAX (1, allocation->height 
+  child2_allocation.height = MAX (1, (gint)allocation->height 
     - child2_allocation.y - border_width);
   
   /* Now allocate the childen, making sure, when resizing not to